package sctu.edu.java.year2016.team06.chenqiang.day20160521.chapter4_2;

/**
 * 编写java程序，应用java程序打印菱形。
 */
public class Chapter4_2 {
    public static void main(String[] args) {
        int i, j;
        for (i = 1; i <= 6; i++) {
            for (j = 1; j <= 11; j++) {
                if (j <= (6 - i) || j >= (6 + i)) {
                    System.out.print(" ");
                } else {
                    System.out.print("*");
                }
            }
            System.out.println("");
        }
        for (i = 7; i <= 11; i++) {
            for (j = 1; j <= 11; j++) {
                if (j <= (i - 6) || j > (11 - (i - 6))) {
                    System.out.print(" ");
                } else {
                    System.out.print("*");
                }
            }
            System.out.println("");
        }
    }
}